import java.awt.geom.Rectangle2D;


public class missile {
	double x;
	double y;
	int width;
	int height;

	int id = 0;

	boolean remove;

	int speed;

	Rectangle2D.Double rectObject;

	public missile(double xP, double yP, int w, int h, int s)
	{
		x = xP;
		y = yP;
		width = w;
		height = h;

		rectObject = new Rectangle2D.Double(x, y, w, h);

		speed = s;
	}

	public missile()
	{

	}

	public int hashCode()
	{
		return this.id;
	}

	public void update(int w, int h)
	{
		x = x + speed;
		rectObject.setRect(x, y, width, height);

		if(x >= w)
		{
			remove = true;
		}
		if(y >= h)
		{
			remove = true;
		}

	}


}
